package br.sales.controller;

import java.util.List;

import br.sales.entity.DynamicQuery;
import br.sales.entity.UserEntity;
import br.sales.entity.exception.EntityExistsException;
import br.sales.entity.exception.EntityNotExistsException;
import br.sales.persistence.IPersistence;
import br.sales.persistence.exception.DBContainerNotInitializedException;

public interface IUserEntityController {

	
	UserEntity authenticate(String login, String password) throws DBContainerNotInitializedException;
	String generatePassword(String pass);
	UserEntity createUserEntity(UserEntity userEntity) throws DBContainerNotInitializedException, EntityExistsException;
	UserEntity createUserEntity(UserEntity userEntity, IPersistence persistence) throws DBContainerNotInitializedException, EntityExistsException;
	UserEntity retrieveUserEntity(String login) throws DBContainerNotInitializedException;
	UserEntity retrieveUserEntity(String login, IPersistence persistence) throws DBContainerNotInitializedException;
	UserEntity retrieveUserEntity(UserEntity userEntity) throws DBContainerNotInitializedException;
	UserEntity retrieveUserEntity(UserEntity userEntity, IPersistence persistence) throws DBContainerNotInitializedException;
	List<UserEntity> listAllUsers() throws DBContainerNotInitializedException;
	UserEntity updateUserEntity(UserEntity userEntity) throws DBContainerNotInitializedException, EntityNotExistsException, Exception;
	UserEntity updateUserEntity(UserEntity userEntity, IPersistence persistence)
			throws DBContainerNotInitializedException;
	void deleteUserEntity(UserEntity userEntity)
			throws DBContainerNotInitializedException, EntityNotExistsException;
	void deleteUserEntity(UserEntity userEntity, IPersistence persistence)
			throws DBContainerNotInitializedException;
	
	
	List<UserEntity> listByValue(String value) throws DBContainerNotInitializedException;
	
}

